var eventUtils = {
	// 添加句柄
	addHandler:function(ele,type,handler){
		if(ele.addEventListener){    //netscape
			ele.addEventListener(type,handler,false);   //false代表冒泡流
		}else if(ele.attachEvent){     //ie
			ele.attachEvent('on'+type,handler);
		}else{
			ele['on'+type] = handler;   //DOM0级
		}
	},
	// 删除句柄
	removeHandler: function(ele,type,handler){
		if(ele.removeEventListener){	
			ele.removeEventListener(type,handler,false);
		}else if(ele.detachEvent){
			ele.detachEvent('on'+type,handler);
		}else{
			ele['on'+type] = handler;
		}
	},
	getEvent: function(event){
		return event || window.event;
	},
	getEventType: function(event){
		event = event || window.event;
		return event.type;
	},
	getEventTarget: function(event){
		event = event || window.event;
		return event.target;
	},
	preventDefault: function(event){
		event = event || window.event;
		if(event.preventDefault){
			event.preventDefault();
		}else{
			event.returnValue = false;
		}
	},
	stopPropagation: function(event){
		event =  event || window.event;
		if(event.stopPropagation){
			event.stopPropagation();
		}else{
			event.cancelBubble = true;
		}
	}
}